import React, { Component } from 'react'
import styles from '../style.less'
import { Route, Redirect } from 'react-router-dom'
import loadable from 'loadable-components'
import { hot } from 'react-hot-loader'
@hot(module)
export default class extends Component {
  render() {
    return (
      <div className={styles.content}>
        <Route
          exact
          path="/admin"
          render={() => <Redirect to="/admin/home" />}
        />
        <Route
          path="/admin/home"
          component={loadable(() => import('@/Home'))}
        />
        <Route
          path="/admin/file"
          component={loadable(() => import('@/File'))}
        />
      </div>
    )
  }
}
